﻿<Window x:Class="WpfWordsLearner.Views.SearchView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:local="clr-namespace:WpfWordsLearner"
        Title="Search"
        Width="300"
        Height="155"
        AllowsTransparency="True"
        Background="Transparent"
        FocusManager.FocusedElement="{Binding ElementName=txtSearch}"
        WindowStyle="None">
	<Grid>
		<Grid Margin="3">
			<!--  WINDOW RECT  -->
			<Rectangle Name="windowRect"
			           Margin="2"
			           Fill="{StaticResource windowBrush}"
			           Opacity="0.8"
			           RadiusX="16"
			           RadiusY="16"
			           Stroke="{StaticResource sliderBrush}"
			           StrokeThickness="0">
				<Rectangle.BitmapEffect>
					<DropShadowBitmapEffect />
				</Rectangle.BitmapEffect>
			</Rectangle>
			<!--  WINDOW HEADER  -->
			<Label Name="headerLabel"
			       Height="18"
			       Margin="15,2,118,0"
			       VerticalAlignment="Top"
			       Content="{Binding RelativeSource={RelativeSource AncestorType=Window,
			                                                        Mode=FindAncestor},
			                         Path=Title}"
			       FontSize="10"
			       FontWeight="Normal"
			       Foreground="{StaticResource sliderBrush}"
			       MouseLeftButtonDown="headerLabel_MouseLeftButtonDown" />
			<Button x:Name="closeButton"
			        Width="11"
			        Height="11"
			        Margin="0,4,15,0"
			        HorizontalAlignment="Right"
			        VerticalAlignment="Top"
			        Click="closeButton_Click"
			        Content="Button"
			        Style="{StaticResource closeButton}"
			        ToolTip="Закрыть окно" />
			<!--  Main view  -->
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="20" />
					<RowDefinition />
				</Grid.RowDefinitions>
				<StackPanel Grid.Row="1">
					<TextBox x:Name="txtSearch"
					         Height="45"
					         Margin="5,0,5,8"
					         AcceptsReturn="True"
					         AcceptsTab="True"
					         VerticalScrollBarVisibility="Auto">
						<i:Interaction.Behaviors>
							<local:WatermarkTextBoxBehavior Watermark="Enter word to search here..." />
						</i:Interaction.Behaviors>
					</TextBox>
					<Button x:Name="btnSearch"
					        Width="55"
					        Height="25"
					        HorizontalAlignment="Center"
					        Click="btnSearch_Click"
					        Content="Поиск"
					        IsCancel="False"
					        Style="{DynamicResource MyButtonGlowStyle}" />
				</StackPanel>
			</Grid>

		</Grid>

	</Grid>
</Window>
